package org.bao.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.bao.bean.usermessageBean;
import org.bao.dao.usermessageDao;
import org.bao.service.IRegisterService;
import org.springframework.stereotype.Service;

@Service("RegisterS")
public class RegisterService implements IRegisterService {
	// 依赖注入【反转控制】
	@Resource
	private usermessageDao loginD; // 按类型匹配进行注入

	@Override
	public Integer insertUserMessage(usermessageBean userB) {

		Integer count = loginD.insertSelective(userB);
		return count;
	}

	@Override
	public List<usermessageBean> telAjaxQuery(usermessageBean userB) {

		List<usermessageBean> query = loginD.selectByPrimaryTel(userB);
		System.out.println("查到的用户信息为:" + query);

		return query;
	}

	@Override
	public Integer updataUserMessagePsw(usermessageBean userB) {
		int count = loginD.updateByPrimaryKeySelective(userB);
		System.out.println("执行记录:" + count);
		return count;
	}

}
